
package com.kl.bean;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "username",
    "password",
    "autoRegister",
    "mobile",
    "addresses",
    "nodes"
})
public class User {

    /**
     * 用户名
     * <p>
     * 
     * 
     */
    @JsonProperty("username")
    private String username;
    /**
     * 密码
     * <p>
     * 
     * 
     */
    @JsonProperty("password")
    private String password;
    /**
     * 是否自动注册
     * <p>
     * 控制隐藏字段
     * 
     */
    @JsonProperty("autoRegister")
    @JsonPropertyDescription("\u63a7\u5236\u9690\u85cf\u5b57\u6bb5")
    private Boolean autoRegister;
    /**
     * 手机号
     * <p>
     * 依赖是否自动注册字段
     * 
     */
    @JsonProperty("mobile")
    @JsonPropertyDescription("\u4f9d\u8d56\u662f\u5426\u81ea\u52a8\u6ce8\u518c\u5b57\u6bb5")
    private String mobile;
    /**
     * 联系地址
     * <p>
     * 
     * 
     */
    @JsonProperty("addresses")
    private List<Address> addresses = new ArrayList<Address>();
    /**
     * 数字数组
     * <p>
     * 
     * 
     */
    @JsonProperty("nodes")
    private List<Double> nodes = new ArrayList<Double>();
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    /**
     * 用户名
     * <p>
     * 
     * 
     */
    @JsonProperty("username")
    public String getUsername() {
        return username;
    }

    /**
     * 用户名
     * <p>
     * 
     * 
     */
    @JsonProperty("username")
    public void setUsername(String username) {
        this.username = username;
    }

    public User withUsername(String username) {
        this.username = username;
        return this;
    }

    /**
     * 密码
     * <p>
     * 
     * 
     */
    @JsonProperty("password")
    public String getPassword() {
        return password;
    }

    /**
     * 密码
     * <p>
     * 
     * 
     */
    @JsonProperty("password")
    public void setPassword(String password) {
        this.password = password;
    }

    public User withPassword(String password) {
        this.password = password;
        return this;
    }

    /**
     * 是否自动注册
     * <p>
     * 控制隐藏字段
     * 
     */
    @JsonProperty("autoRegister")
    public Boolean getAutoRegister() {
        return autoRegister;
    }

    /**
     * 是否自动注册
     * <p>
     * 控制隐藏字段
     * 
     */
    @JsonProperty("autoRegister")
    public void setAutoRegister(Boolean autoRegister) {
        this.autoRegister = autoRegister;
    }

    public User withAutoRegister(Boolean autoRegister) {
        this.autoRegister = autoRegister;
        return this;
    }

    /**
     * 手机号
     * <p>
     * 依赖是否自动注册字段
     * 
     */
    @JsonProperty("mobile")
    public String getMobile() {
        return mobile;
    }

    /**
     * 手机号
     * <p>
     * 依赖是否自动注册字段
     * 
     */
    @JsonProperty("mobile")
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public User withMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    /**
     * 联系地址
     * <p>
     * 
     * 
     */
    @JsonProperty("addresses")
    public List<Address> getAddresses() {
        return addresses;
    }

    /**
     * 联系地址
     * <p>
     * 
     * 
     */
    @JsonProperty("addresses")
    public void setAddresses(List<Address> addresses) {
        this.addresses = addresses;
    }

    public User withAddresses(List<Address> addresses) {
        this.addresses = addresses;
        return this;
    }

    /**
     * 数字数组
     * <p>
     * 
     * 
     */
    @JsonProperty("nodes")
    public List<Double> getNodes() {
        return nodes;
    }

    /**
     * 数字数组
     * <p>
     * 
     * 
     */
    @JsonProperty("nodes")
    public void setNodes(List<Double> nodes) {
        this.nodes = nodes;
    }

    public User withNodes(List<Double> nodes) {
        this.nodes = nodes;
        return this;
    }

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public User withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(User.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("username");
        sb.append('=');
        sb.append(((this.username == null)?"<null>":this.username));
        sb.append(',');
        sb.append("password");
        sb.append('=');
        sb.append(((this.password == null)?"<null>":this.password));
        sb.append(',');
        sb.append("autoRegister");
        sb.append('=');
        sb.append(((this.autoRegister == null)?"<null>":this.autoRegister));
        sb.append(',');
        sb.append("mobile");
        sb.append('=');
        sb.append(((this.mobile == null)?"<null>":this.mobile));
        sb.append(',');
        sb.append("addresses");
        sb.append('=');
        sb.append(((this.addresses == null)?"<null>":this.addresses));
        sb.append(',');
        sb.append("nodes");
        sb.append('=');
        sb.append(((this.nodes == null)?"<null>":this.nodes));
        sb.append(',');
        sb.append("additionalProperties");
        sb.append('=');
        sb.append(((this.additionalProperties == null)?"<null>":this.additionalProperties));
        sb.append(',');
        if (sb.charAt((sb.length()- 1)) == ',') {
            sb.setCharAt((sb.length()- 1), ']');
        } else {
            sb.append(']');
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = ((result* 31)+((this.password == null)? 0 :this.password.hashCode()));
        result = ((result* 31)+((this.addresses == null)? 0 :this.addresses.hashCode()));
        result = ((result* 31)+((this.nodes == null)? 0 :this.nodes.hashCode()));
        result = ((result* 31)+((this.mobile == null)? 0 :this.mobile.hashCode()));
        result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
        result = ((result* 31)+((this.autoRegister == null)? 0 :this.autoRegister.hashCode()));
        result = ((result* 31)+((this.username == null)? 0 :this.username.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof User) == false) {
            return false;
        }
        User rhs = ((User) other);
        return ((((((((this.password == rhs.password)||((this.password!= null)&&this.password.equals(rhs.password)))&&((this.addresses == rhs.addresses)||((this.addresses!= null)&&this.addresses.equals(rhs.addresses))))&&((this.nodes == rhs.nodes)||((this.nodes!= null)&&this.nodes.equals(rhs.nodes))))&&((this.mobile == rhs.mobile)||((this.mobile!= null)&&this.mobile.equals(rhs.mobile))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.autoRegister == rhs.autoRegister)||((this.autoRegister!= null)&&this.autoRegister.equals(rhs.autoRegister))))&&((this.username == rhs.username)||((this.username!= null)&&this.username.equals(rhs.username))));
    }

}
